<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>系统错误</title>
    <style>        body { font-family: Arial, sans-serif; margin: 40px; }
    .error-container { border: 1px solid #ddd; padding: 20px; border-radius: 5px; }
    .error-code { color: #e74c3c; font-size: 24px; }
    .error-message { color: #333; margin: 10px 0; }
    .back-button { background-color: #3498db; color: white; padding: 10px 15px;
        text-decoration: none; border-radius: 3px; }
    </style>
</head>
<body>
<div class="error-container">
    <h1>系统错误</h1>
    <div class="error-code" th:text="${code}">500</div>
    <div class="error-message" th:text="${error}">Internal Server Error</div>
    <div th:if="${message}">
        <strong>详细信息:</strong>
        <p th:text="${message}">Error details</p>
    </div>
    <div th:if="${timestamp}">
        <small>发生时间: <span th:text="${timestamp}"></span></small>
    </div>

    <div style="margin-top: 20px;">
        <button class="back-button" onclick="goBack()">返回上一页</button>
        <a href="/" th:href="@{/toAdminMain}" class="back-button" style="margin-left: 10px;">返回首页</a>
    </div>
</div>

<script>        function goBack() {
    window.history.back();
}
</script>
</body>
</html>